package com.sa.ibiz.demo.demo.domain;

import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonProperty.Access;
import lombok.Data;
import org.springframework.beans.BeanUtils;
import org.springframework.cglib.beans.BeanMap;
import org.springframework.cglib.beans.BeanGenerator;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.FieldFill;
import java.util.Map;
import java.util.HashMap;
import org.springframework.util.StringUtils;
import com.sa.ibiz.demo.ibizutil.security.AuthenticationUser;
import java.util.Date;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import org.springframework.util.DigestUtils;
import org.springframework.util.StringUtils;
import java.util.UUID;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import org.springframework.cglib.beans.BeanCopier;
import com.sa.ibiz.demo.ibizutil.annotation.Dict;
import com.sa.ibiz.demo.ibizutil.domain.EntityBase;
import java.io.Serializable;
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import java.math.BigInteger;
import com.sa.ibiz.demo.ibizutil.enums.FillMode;
import com.sa.ibiz.demo.ibizutil.enums.PredefinedType;
import com.sa.ibiz.demo.ibizutil.annotation.PreField;
import com.alibaba.fastjson.annotation.JSONField;

import com.sa.ibiz.demo.demo.domain.WFInstance;

/**
 * 实体[WFStep] 数据对象
 */
@TableName(value = "T_SRFWFSTEP",resultMap = "WFStepResultMap")
@JsonIgnoreProperties(ignoreUnknown = true)
@Data
public class WFStep extends EntityBase implements Serializable{

    @JSONField(serialize = false)
    @JsonIgnore
    @TableField(exist = false)//关系主表数据
    private WFInstance wfinstance;
    @PreField(fill= FillMode.INSERT,preType = PredefinedType.CREATEDATE)
    private Timestamp createdate;
    @PreField(fill= FillMode.INSERT,preType = PredefinedType.CREATEMAN)
    @Dict(dictName = "WorkflowMob_SysOperatorCodeList")
    private String createman;
    private Timestamp deadline;
    private Timestamp endtime;
    private String fromwfstepid;
    @Dict(dictName = "WorkflowMob_YesNoCodeList")
    private Integer isfinish;
    @Dict(dictName = "WorkflowMob_YesNoCodeList")
    private Integer isinteractive;
    private String lastactorid;
    private String memo;
    private Timestamp starttime;
    private Integer tracestep;
    @PreField(fill= FillMode.INSERT_UPDATE,preType = PredefinedType.UPDATEDATE)
    private Timestamp updatedate;
    @PreField(fill= FillMode.INSERT_UPDATE,preType = PredefinedType.UPDATEMAN)
    @Dict(dictName = "WorkflowMob_SysOperatorCodeList")
    private String updateman;
    private String wfinstanceid;
    @TableField(exist = false)//逻辑属性
    private String wfinstancename;
    private String wfplogicname;
    private String wfpmodel;
    private String wfpname;
    @TableId(value= "wfstepid",type=IdType.UUID)//指定主键生成策略
    private String wfstepid;
    private String wfsteplanrestag;
    private String wfstepname;
    private Integer wfversion;
    /**
     *  设置属性值[建立时间]
     *  @param createdate
     */
    public void setCreatedate(Timestamp createdate){
        this.createdate = createdate;
        this.set("createdatedirtyflag",true);
    }
    /**
     *  获取属性值[建立时间]
     */
    public Timestamp getCreatedate(){
        return this.createdate;
    }
    /**
     *  重置属性值[建立时间]
     */
    public void resetCreatedate(){
        this.set("createdatedirtyflag",false);
        this.createdate = null;
    }
    /**
     *  设置属性值[建立人]
     *  @param createman
     */
    public void setCreateman(String createman){
        if(StringUtils.isEmpty(createman))
            createman=null;
        this.createman = createman;
        this.set("createmandirtyflag",true);
    }
    /**
     *  获取属性值[建立人]
     */
    public String getCreateman(){
        return this.createman;
    }
    /**
     *  重置属性值[建立人]
     */
    public void resetCreateman(){
        this.set("createmandirtyflag",false);
        this.createman = null;
    }
    /**
     *  设置属性值[步骤限时]
     *  @param deadline
     */
    public void setDeadline(Timestamp deadline){
        this.deadline = deadline;
        this.set("deadlinedirtyflag",true);
    }
    /**
     *  获取属性值[步骤限时]
     */
    public Timestamp getDeadline(){
        return this.deadline;
    }
    /**
     *  重置属性值[步骤限时]
     */
    public void resetDeadline(){
        this.set("deadlinedirtyflag",false);
        this.deadline = null;
    }
    /**
     *  设置属性值[结束时间]
     *  @param endtime
     */
    public void setEndtime(Timestamp endtime){
        this.endtime = endtime;
        this.set("endtimedirtyflag",true);
    }
    /**
     *  获取属性值[结束时间]
     */
    public Timestamp getEndtime(){
        return this.endtime;
    }
    /**
     *  重置属性值[结束时间]
     */
    public void resetEndtime(){
        this.set("endtimedirtyflag",false);
        this.endtime = null;
    }
    /**
     *  设置属性值[FROMWFSTEPID]
     *  @param fromwfstepid
     */
    public void setFromwfstepid(String fromwfstepid){
        if(StringUtils.isEmpty(fromwfstepid))
            fromwfstepid=null;
        this.fromwfstepid = fromwfstepid;
        this.set("fromwfstepiddirtyflag",true);
    }
    /**
     *  获取属性值[FROMWFSTEPID]
     */
    public String getFromwfstepid(){
        return this.fromwfstepid;
    }
    /**
     *  重置属性值[FROMWFSTEPID]
     */
    public void resetFromwfstepid(){
        this.set("fromwfstepiddirtyflag",false);
        this.fromwfstepid = null;
    }
    /**
     *  设置属性值[是否完成]
     *  @param isfinish
     */
    public void setIsfinish(Integer isfinish){
        this.isfinish = isfinish;
        this.set("isfinishdirtyflag",true);
    }
    /**
     *  获取属性值[是否完成]
     */
    public Integer getIsfinish(){
        return this.isfinish;
    }
    /**
     *  重置属性值[是否完成]
     */
    public void resetIsfinish(){
        this.set("isfinishdirtyflag",false);
        this.isfinish = null;
    }
    /**
     *  设置属性值[ISINTERACTIVE]
     *  @param isinteractive
     */
    public void setIsinteractive(Integer isinteractive){
        this.isinteractive = isinteractive;
        this.set("isinteractivedirtyflag",true);
    }
    /**
     *  获取属性值[ISINTERACTIVE]
     */
    public Integer getIsinteractive(){
        return this.isinteractive;
    }
    /**
     *  重置属性值[ISINTERACTIVE]
     */
    public void resetIsinteractive(){
        this.set("isinteractivedirtyflag",false);
        this.isinteractive = null;
    }
    /**
     *  设置属性值[LASTACTORID]
     *  @param lastactorid
     */
    public void setLastactorid(String lastactorid){
        if(StringUtils.isEmpty(lastactorid))
            lastactorid=null;
        this.lastactorid = lastactorid;
        this.set("lastactoriddirtyflag",true);
    }
    /**
     *  获取属性值[LASTACTORID]
     */
    public String getLastactorid(){
        return this.lastactorid;
    }
    /**
     *  重置属性值[LASTACTORID]
     */
    public void resetLastactorid(){
        this.set("lastactoriddirtyflag",false);
        this.lastactorid = null;
    }
    /**
     *  设置属性值[备注]
     *  @param memo
     */
    public void setMemo(String memo){
        if(StringUtils.isEmpty(memo))
            memo=null;
        this.memo = memo;
        this.set("memodirtyflag",true);
    }
    /**
     *  获取属性值[备注]
     */
    public String getMemo(){
        return this.memo;
    }
    /**
     *  重置属性值[备注]
     */
    public void resetMemo(){
        this.set("memodirtyflag",false);
        this.memo = null;
    }
    /**
     *  设置属性值[开始时间]
     *  @param starttime
     */
    public void setStarttime(Timestamp starttime){
        this.starttime = starttime;
        this.set("starttimedirtyflag",true);
    }
    /**
     *  获取属性值[开始时间]
     */
    public Timestamp getStarttime(){
        return this.starttime;
    }
    /**
     *  重置属性值[开始时间]
     */
    public void resetStarttime(){
        this.set("starttimedirtyflag",false);
        this.starttime = null;
    }
    /**
     *  设置属性值[步骤次序]
     *  @param tracestep
     */
    public void setTracestep(Integer tracestep){
        this.tracestep = tracestep;
        this.set("tracestepdirtyflag",true);
    }
    /**
     *  获取属性值[步骤次序]
     */
    public Integer getTracestep(){
        return this.tracestep;
    }
    /**
     *  重置属性值[步骤次序]
     */
    public void resetTracestep(){
        this.set("tracestepdirtyflag",false);
        this.tracestep = null;
    }
    /**
     *  设置属性值[更新时间]
     *  @param updatedate
     */
    public void setUpdatedate(Timestamp updatedate){
        this.updatedate = updatedate;
        this.set("updatedatedirtyflag",true);
    }
    /**
     *  获取属性值[更新时间]
     */
    public Timestamp getUpdatedate(){
        return this.updatedate;
    }
    /**
     *  重置属性值[更新时间]
     */
    public void resetUpdatedate(){
        this.set("updatedatedirtyflag",false);
        this.updatedate = null;
    }
    /**
     *  设置属性值[更新人]
     *  @param updateman
     */
    public void setUpdateman(String updateman){
        if(StringUtils.isEmpty(updateman))
            updateman=null;
        this.updateman = updateman;
        this.set("updatemandirtyflag",true);
    }
    /**
     *  获取属性值[更新人]
     */
    public String getUpdateman(){
        return this.updateman;
    }
    /**
     *  重置属性值[更新人]
     */
    public void resetUpdateman(){
        this.set("updatemandirtyflag",false);
        this.updateman = null;
    }
    /**
     *  设置属性值[处理步骤相关实例]
     *  @param wfinstanceid
     */
    public void setWfinstanceid(String wfinstanceid){
        if(StringUtils.isEmpty(wfinstanceid))
            wfinstanceid=null;
        this.wfinstanceid = wfinstanceid;
        this.set("wfinstanceiddirtyflag",true);
    }
    /**
     *  获取属性值[处理步骤相关实例]
     */
    public String getWfinstanceid(){
        return this.wfinstanceid;
    }
    /**
     *  重置属性值[处理步骤相关实例]
     */
    public void resetWfinstanceid(){
        this.set("wfinstanceiddirtyflag",false);
        this.wfinstanceid = null;
    }
    /**
     *  设置属性值[流程实例]
     *  @param wfinstancename
     */
    public void setWfinstancename(String wfinstancename){
        if(StringUtils.isEmpty(wfinstancename))
            wfinstancename=null;
        this.wfinstancename = wfinstancename;
        this.set("wfinstancenamedirtyflag",true);
    }
    /**
     *  获取属性值[流程实例]
     */
    public String getWfinstancename(){
        return this.wfinstancename;
    }
    /**
     *  重置属性值[流程实例]
     */
    public void resetWfinstancename(){
        this.set("wfinstancenamedirtyflag",false);
        this.wfinstancename = null;
    }
    /**
     *  设置属性值[步骤名称]
     *  @param wfplogicname
     */
    public void setWfplogicname(String wfplogicname){
        if(StringUtils.isEmpty(wfplogicname))
            wfplogicname=null;
        this.wfplogicname = wfplogicname;
        this.set("wfplogicnamedirtyflag",true);
    }
    /**
     *  获取属性值[步骤名称]
     */
    public String getWfplogicname(){
        return this.wfplogicname;
    }
    /**
     *  重置属性值[步骤名称]
     */
    public void resetWfplogicname(){
        this.set("wfplogicnamedirtyflag",false);
        this.wfplogicname = null;
    }
    /**
     *  设置属性值[WFPMODEL]
     *  @param wfpmodel
     */
    public void setWfpmodel(String wfpmodel){
        if(StringUtils.isEmpty(wfpmodel))
            wfpmodel=null;
        this.wfpmodel = wfpmodel;
        this.set("wfpmodeldirtyflag",true);
    }
    /**
     *  获取属性值[WFPMODEL]
     */
    public String getWfpmodel(){
        return this.wfpmodel;
    }
    /**
     *  重置属性值[WFPMODEL]
     */
    public void resetWfpmodel(){
        this.set("wfpmodeldirtyflag",false);
        this.wfpmodel = null;
    }
    /**
     *  设置属性值[WFPNAME]
     *  @param wfpname
     */
    public void setWfpname(String wfpname){
        if(StringUtils.isEmpty(wfpname))
            wfpname=null;
        this.wfpname = wfpname;
        this.set("wfpnamedirtyflag",true);
    }
    /**
     *  获取属性值[WFPNAME]
     */
    public String getWfpname(){
        return this.wfpname;
    }
    /**
     *  重置属性值[WFPNAME]
     */
    public void resetWfpname(){
        this.set("wfpnamedirtyflag",false);
        this.wfpname = null;
    }
    /**
     *  设置属性值[工作流步骤标识]
     *  @param wfstepid
     */
    public void setWfstepid(String wfstepid){
        if(StringUtils.isEmpty(wfstepid))
            wfstepid=null;
        this.wfstepid = wfstepid;
        this.set("wfstepiddirtyflag",true);
    }
    /**
     *  获取属性值[工作流步骤标识]
     */
    public String getWfstepid(){
        return this.wfstepid;
    }
    /**
     *  重置属性值[工作流步骤标识]
     */
    public void resetWfstepid(){
        this.set("wfstepiddirtyflag",false);
        this.wfstepid = null;
    }
    /**
     *  设置属性值[步骤语言资源]
     *  @param wfsteplanrestag
     */
    public void setWfsteplanrestag(String wfsteplanrestag){
        if(StringUtils.isEmpty(wfsteplanrestag))
            wfsteplanrestag=null;
        this.wfsteplanrestag = wfsteplanrestag;
        this.set("wfsteplanrestagdirtyflag",true);
    }
    /**
     *  获取属性值[步骤语言资源]
     */
    public String getWfsteplanrestag(){
        return this.wfsteplanrestag;
    }
    /**
     *  重置属性值[步骤语言资源]
     */
    public void resetWfsteplanrestag(){
        this.set("wfsteplanrestagdirtyflag",false);
        this.wfsteplanrestag = null;
    }
    /**
     *  设置属性值[工作流步骤名称]
     *  @param wfstepname
     */
    public void setWfstepname(String wfstepname){
        if(StringUtils.isEmpty(wfstepname))
            wfstepname=null;
        this.wfstepname = wfstepname;
        this.set("wfstepnamedirtyflag",true);
    }
    /**
     *  获取属性值[工作流步骤名称]
     */
    public String getWfstepname(){
        return this.wfstepname;
    }
    /**
     *  重置属性值[工作流步骤名称]
     */
    public void resetWfstepname(){
        this.set("wfstepnamedirtyflag",false);
        this.wfstepname = null;
    }
    /**
     *  设置属性值[工作流版本]
     *  @param wfversion
     */
    public void setWfversion(Integer wfversion){
        this.wfversion = wfversion;
        this.set("wfversiondirtyflag",true);
    }
    /**
     *  获取属性值[工作流版本]
     */
    public Integer getWfversion(){
        return this.wfversion;
    }
    /**
     *  重置属性值[工作流版本]
     */
    public void resetWfversion(){
        this.set("wfversiondirtyflag",false);
        this.wfversion = null;
    }
     /**
     *  获取主实体关联数据[WFInstance]
     */
    public WFInstance getWfinstance() {
        return wfinstance;
    }
    /**
     *  设置主实体关联数据[WFInstance]
     */
    public void setWfinstance(WFInstance wfinstance) {
        this.wfinstance = wfinstance;
    }

    /**
     * 重置当前数据对象属性值
     */
    public  void reset(){
        resetCreatedate();
        resetCreateman();
        resetDeadline();
        resetEndtime();
        resetFromwfstepid();
        resetIsfinish();
        resetIsinteractive();
        resetLastactorid();
        resetMemo();
        resetStarttime();
        resetTracestep();
        resetUpdatedate();
        resetUpdateman();
        resetWfinstanceid();
        resetWfinstancename();
        resetWfplogicname();
        resetWfpmodel();
        resetWfpname();
        resetWfstepid();
        resetWfsteplanrestag();
        resetWfstepname();
        resetWfversion();
    }
     /**
     * 获取数据主键（普通主键与联合主键）
     * @return
     */
    @JsonIgnore
    public Serializable getDefaultPrimaryKey()
    {
	    //随机生成主键
         return  IdWorker.get32UUID();

    }
     /**
     * 复制当前对象数据到目标对象(粘贴重置)
     *
     * @throws Exception
     */
    public WFStep copyTo(WFStep targetEntity)
	{
		BeanCopier copier=BeanCopier.create(WFStep.class, WFStep.class, false);
		copier.copy(this, targetEntity, null);
        targetEntity.resetWfstepid();
		return targetEntity;
	}
}